package cn.wolfcode.trip.app.controller;

import cn.wolfcode.trip.base.domain.StrategyComment;
import cn.wolfcode.trip.base.domain.Tag;
import cn.wolfcode.trip.base.query.StrategyCommentQueryObject;
import cn.wolfcode.trip.base.service.IStrategyCommentService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/strategyComments")
public class StrategyCommentController {

    @Autowired
    private IStrategyCommentService commentService;

    @GetMapping
    public PageInfo queryForList(StrategyCommentQueryObject qo) {
        qo.setPageSize(0);
        return commentService.queryForList(qo);
    }

    @GetMapping("{strategyId}")
    public List<Tag> queryForTagList(@PathVariable Long strategyId) {
        return commentService.queryForTagList(strategyId);
    }
}
